Skip to content

Bump version to 3.20.0 and refactor binary tag handling#369

Merged
twisti-dev merged 1 commit into
version/26.1from
fix/binary-tag-holder
Jun 8, 2026
Merged

Bump version to 3.20.0 and refactor binary tag handling#369
twisti-dev merged 1 commit into
version/26.1from
fix/binary-tag-holder

Conversation

@twisti-dev

Copy link
Copy Markdown
Contributor

This pull request introduces several improvements and new features related to NBT (Named Binary Tag) handling and Gradle relocation logic, along with some version bumps. The main highlights are the addition of utility functions for encoding/decoding NBT tags, enhanced relocation logic that supports package exclusions, and corresponding configuration updates.

NBT Utilities:

  • Added utility functions in nbt-extension.kt for encoding a BinaryTag as a BinaryTagHolder and decoding a BinaryTagHolder back to a BinaryTag or specifically a CompoundBinaryTag. This provides a type-safe and convenient way to serialize and deserialize NBT data. [1] [2]

Relocation Logic Enhancements:

  • Refactored relocation logic in CommonSurfPlugin to support specifying exclusions when relocating packages, by introducing a Relocation data class and updating related methods and usages. [1] [2] [3] [4]
  • Updated the core plugin to use the new relocatePackage method for net.kyori.adventure.nbt, excluding the net.kyori.adventure.nbt.api.** package from relocation.
  • Modified the Gradle shadow JAR relocation in core-convention.gradle.kts to exclude net.kyori.adventure.nbt.api.** from relocation, preventing conflicts or issues with API classes.

Version Bumps:

  • Bumped surf-api-core version to 3.20.0 and surf-api-gradle-plugin version to 2.0.8 to reflect the new features and changes. [1] [2]

- increment version from 3.19.0 to 3.20.0 in gradle.properties
- change relocations from mutableMap to mutableList for better handling
- add new methods for encoding and decoding BinaryTagHolder
@twisti-dev twisti-dev self-assigned this Jun 8, 2026
Copilot AI review requested due to automatic review settings June 8, 2026 19:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the project version to 3.20.0 (Gradle plugin to 2.0.8) and refactors Shadow relocation configuration to support per-relocation exclusion patterns, while also adding new NBT BinaryTag/BinaryTagHolder encode/decode utilities to the core API.

Changes:

  • Added BinaryTag.asTagHolder() plus BinaryTagHolder.decodeTag() / decodeCompoundTag() utilities for SNBT-based encode/decode.
  • Refactored Gradle plugin relocation handling to support exclusions (e.g., do not relocate net.kyori.adventure.nbt.api.**).
  • Updated versioning and ABI dump to reflect the new public API surface.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
surf-api-gradle-plugin/src/main/kotlin/dev/slne/surf/api/gradle/platform/core/CoreSurfPlugin.kt Switches Adventure NBT relocation to the new exclusion-capable relocation API.
surf-api-gradle-plugin/src/main/kotlin/dev/slne/surf/api/gradle/platform/common/CommonSurfPlugin.kt Introduces Relocation model + relocatePackage(...) to support Shadow relocation excludes.
surf-api-gradle-plugin/build.gradle.kts Bumps Gradle plugin version to 2.0.8.
surf-api-core/surf-api-core/src/main/kotlin/dev/slne/surf/api/core/nbt/nbt-extension.kt Adds BinaryTagHolder encode/decode extension utilities to the core NBT API.
surf-api-core/surf-api-core/api/surf-api-core.api Updates ABI dump to include the new NBT extension functions.
gradle.properties Bumps overall project version to 3.20.0.
buildSrc/src/main/kotlin/core-convention.gradle.kts Updates Shadow relocation to exclude net.kyori.adventure.nbt.api.** from relocation.

@twisti-dev

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@twisti-dev twisti-dev merged commit 1911272 into version/26.1 Jun 8, 2026
8 checks passed
@twisti-dev twisti-dev deleted the fix/binary-tag-holder branch June 8, 2026 20:38
@mergify

mergify Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • 🟠 Waiting for queue conditions
  • ⏳ Enter queue
  • ⏳ Run checks
  • ⏳ Merge
Waiting for
  • -closed [📌 queue requirement]
  • #approved-reviews-by >= 1 [🛡 GitHub repository ruleset rule Default]
  • #approved-reviews-by >= 1 [🛡 GitHub repository ruleset rule Version]
  • github-review-decision = APPROVED [🛡 GitHub repository ruleset rule Default]
  • github-review-decision = APPROVED [🛡 GitHub repository ruleset rule Version]
All conditions
  • -closed [📌 queue requirement]
  • any of [🔀 queue conditions]:
    • all of [📌 queue conditions of queue rule default]:
      • #approved-reviews-by >= 1 [🛡 GitHub repository ruleset rule Default]
      • #approved-reviews-by >= 1 [🛡 GitHub repository ruleset rule Version]
      • github-review-decision = APPROVED [🛡 GitHub repository ruleset rule Default]
      • github-review-decision = APPROVED [🛡 GitHub repository ruleset rule Version]
      • #review-threads-unresolved = 0 [🛡 GitHub repository ruleset rule Default]
      • #review-threads-unresolved = 0 [🛡 GitHub repository ruleset rule Version]
      • any of [🛡 GitHub repository ruleset rule Default]:
        • check-success = api-check
        • check-neutral = api-check
        • check-skipped = api-check
      • any of [🛡 GitHub repository ruleset rule Default]:
        • check-success = close_invalid_pr
        • check-neutral = close_invalid_pr
        • check-skipped = close_invalid_pr
      • any of [🛡 GitHub repository ruleset rule Default]:
        • check-neutral = Mergify Merge Protections
        • check-skipped = Mergify Merge Protections
        • check-success = Mergify Merge Protections
      • any of [🛡 GitHub repository ruleset rule Version]:
        • check-success = api-check
        • check-neutral = api-check
        • check-skipped = api-check
      • any of [🛡 GitHub repository ruleset rule Version]:
        • check-success = close_invalid_pr
        • check-neutral = close_invalid_pr
        • check-skipped = close_invalid_pr
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of [📌 queue -> configuration change requirements]:
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of [📌 queue requirement]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants